import java.awt.Button;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;


public class ButtonListener implements ActionListener {
	
	private GUI gui;
	private Button button;
	private String type;

	public ButtonListener(GUI g, Button b, String t) {
		gui = g;
		button = b;
		type = t;
		
		button.addActionListener(this);
	}
	
	@Override
	public void actionPerformed(ActionEvent evt) {
		gui.buttonClicked(type);
	}

}
